import request from '@/config/axios'
import type { Dayjs } from 'dayjs';

/** 产品ID管理信息 */
export interface MangeId {
          id: number; // id
          name?: string; // 名称
          parentId?: number; // 父类型id
    children?: MangeId[];
  }

// 产品ID管理 API
export const MangeIdApi = {
  // 查询产品ID管理列表
  getMangeIdList: async (params) => {
    return await request.get({ url: `/business/mange-id/list`, params })
  },

  // 查询产品ID管理详情
  getMangeId: async (id: number) => {
    return await request.get({ url: `/business/mange-id/get?id=` + id })
  },

  // 新增产品ID管理
  createMangeId: async (data: MangeId) => {
    return await request.post({ url: `/business/mange-id/create`, data })
  },

  // 修改产品ID管理
  updateMangeId: async (data: MangeId) => {
    return await request.put({ url: `/business/mange-id/update`, data })
  },

  // 删除产品ID管理
  deleteMangeId: async (id: number) => {
    return await request.delete({ url: `/business/mange-id/delete?id=` + id })
  },


  // 导出产品ID管理 Excel
  exportMangeId: async (params) => {
    return await request.download({ url: `/business/mange-id/export-excel`, params })
  }
}